<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/8
 * Time: 17:02
 */
session_start();
$key=$_COOKIE['userkey'];
if(!isset($_SESSION[$key])){
    echo '<a href="../login.php">前往登录</a>';
    die;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>密码修改</h1>
<?php
    echo '<p style="font-size: x-large">欢迎您:'.$_SESSION[$key]['user_name'].'</p>';
?>
<form method="post" action="change_pwd.php" >
    <input type="text" name="old_pwd" placeholder="请输入旧密码"><br/>
    <input type="text" name="new_pwd" placeholder="请输入新密码"><br/>
    <input type="submit">
</form>
</body>
</html>
